package cn.iocoder.yudao.module.im.controller.app.message.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户APP - 消息响应 VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户APP - 消息响应")
@Data
public class AppMessageRespVO {

    @Schema(description = "消息ID", example = "12345")
    private Long id;

    @Schema(description = "消息唯一标识", example = "msg_12345")
    private String msgId;

    @Schema(description = "发送者用户ID", example = "123")
    private Long fromUserId;

    @Schema(description = "接收者用户ID", example = "456")
    private Long toUserId;
    
    @Schema(description = "聊天标识", example = "123-456")
    private String chatIdentify;

    @Schema(description = "消息类型", example = "text")
    private String type;

    @Schema(description = "消息内容", example = "Hello World")
    private String content;

    @Schema(description = "是否群聊", example = "0")
    private Integer isGroup;

    @Schema(description = "是否已读", example = "0")
    private Integer isRead;

    @Schema(description = "是否最新消息", example = "1")
    private Integer isLast;

    @Schema(description = "文件ID", example = "1024")
    private Long fileId;

    @Schema(description = "文件分类", example = "1")
    private Integer fileCate;

    @Schema(description = "文件大小", example = "1024KB")
    private String fileSize;

    @Schema(description = "文件名称", example = "test.jpg")
    private String fileName;

    @Schema(description = "@用户列表")
    private List<Long> at;

    @Schema(description = "回复消息ID", example = "12345")
    private Long pid;

    @Schema(description = "扩展信息")
    private String extendData;

    @Schema(description = "发送时间戳", example = "1640995200000")
    private Long sendTime;

    @Schema(description = "创建时间", example = "2024-01-01 12:00:00")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2024-01-01 12:00:00")
    private LocalDateTime updateTime;

    // ========== 扩展字段 ==========

    @Schema(description = "发送者用户信息")
    private AppMessageUserVO fromUser;

    @Schema(description = "接收者用户信息")
    private AppMessageUserVO toUser;

    @Schema(description = "引用消息扩展信息")
    private Object extendInfo;

}